add retain namespace scc checkbox in the dr enrollment - #2794
Conversation
|
@asn1809: changing LGTM is restricted to collaborators DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
ff64ac9 to
262a8c7
Compare
| <Checkbox | ||
| id="Namespace-scc" | ||
| label={t( | ||
| 'Use Same Namespace Security Context Constraints (SCC) across peers' |
There was a problem hiding this comment.
| 'Use Same Namespace Security Context Constraints (SCC) across peers' | |
| 'Use same Namespace Security Context Constraints (SCC) across peers' |
| 'A Namespace with same SELinux/Annotations is automatically created on the destination cluster when the application is enrolled' | ||
| )} | ||
| isChecked={retainNamespaceSCC} | ||
| onChange={(_event, checked) => onRetainNamespaceSCCChange?.(checked)} |
There was a problem hiding this comment.
| onChange={(_event, checked) => onRetainNamespaceSCCChange?.(checked)} | |
| onChange={(_event, checked) => onRetainNamespaceSCCChange(checked)} |
is optional chaining required?
There was a problem hiding this comment.
yes it is needed
There was a problem hiding this comment.
why is it needed ??
There was a problem hiding this comment.
not needed.. sorry
There was a problem hiding this comment.
I have removed the optional chaining
| /> | ||
| </FormGroup> | ||
| <Checkbox | ||
| id="Namespace-scc" |
There was a problem hiding this comment.
| id="Namespace-scc" | |
| id="namespace-scc" |
262a8c7 to
5b88db6
Compare
5b88db6 to
6a5138a
Compare
SanjalKatiyar
left a comment
There was a problem hiding this comment.
This PR only adds a checkbox to the UI. The user can select it, and the state gets stored in Redux, but then what happens next ??
I don't see any changes showing how that selection is being passed to Ramen. How is the selected value actually being conveyed ?? Where are we updating the DRPC with this information ??
|
I see changes in 2 flows: discovered-application-wizard and app-manage-policies (modal). Plz test and add screenshots for all the flows. |
|
/hold |
@vbnrh can u plz verify we are not missing any discovered app flow and these 2 flows covers everything we have in UI for all type of apps (VMs or otherwise) ?? |
|
/approve cancel |
6a5138a to
c45e71c
Compare
Hey I have tested the flow for discovered-application-wizard, however for the app-manage-policies I don't know how do I get to that page. @vbnrh @SanjalKatiyar Can u help me out |
Addressed |
c45e71c to
ae95668
Compare
| 'Enable the `retainNamespaceSCCAcrossPeers` flag in the RamenConfig to automatically create namespaces with matching security context constraints (SCC) acrross peer clusters. Learn more' | ||
| )} | ||
| </Alert> | ||
| )} |
There was a problem hiding this comment.
plz create a common component and use at all the required places.
| isDisabled={!retainNamespaceSCCAcrossPeers} | ||
| /> | ||
| {!retainNamespaceSCCAcrossPeers && ( | ||
| <Alert |
There was a problem hiding this comment.
where r select-policy-wizard-content and replication-wizard-content used ?? why we need at both places ??
There was a problem hiding this comment.
There are 3 places where we need to have the checkbox:
1- replication-step.tsx : DR → Protected Applications → "Enroll discovered application" wizard → step 3: Replication
2- select-policy-wizard-content.tsx: DR → Applications/VMs→ "Manage DR policy" modal → step 1: Policy (for subscription/ApplicationSet apps)
3- replication-wizard-content.tsx: DR-> Virtual MACHINES -> "Manage DR policy" modal -> step 2: Replication(only for Discovered VMs).
CC: @vbnrh
ae95668 to
8a8f53f
Compare
Tested both the pages now. |
| const raw = cm?.data?.[RAMEN_CONFIG_KEY]; | ||
| if (!raw) { | ||
| return [ | ||
| {} as RamenConfig, | ||
| loaded, | ||
| new Error( | ||
| `Missing key ${RAMEN_CONFIG_KEY} in ConfigMap ${RAMEN_HUB_OPERATOR_CONFIG_NAME}/${ODFMCO_OPERATOR_NAMESPACE}` | ||
| ), | ||
| ]; | ||
| } | ||
|
|
||
| let ramenConfig: RamenConfig = {} as RamenConfig; | ||
| try { | ||
| ramenConfig = (yaml.load(raw) || {}) as RamenConfig; | ||
| } catch (err: any) { | ||
| return [ | ||
| {} as RamenConfig, | ||
| loaded, | ||
| new Error( | ||
| `Failed to parse YAML from ConfigMap ${RAMEN_HUB_OPERATOR_CONFIG_NAME}: ${ | ||
| err?.message || JSON.stringify(err) | ||
| }` | ||
| ), | ||
| ]; | ||
| } |
There was a problem hiding this comment.
Memoize this otherwise it will parse on every render
| .mco-manage-policies { | ||
| &__form--width { | ||
| width: 50%; | ||
| width: fit-content; |
There was a problem hiding this comment.
Ensure that the other wizard flows are not having major layout shifts
There was a problem hiding this comment.
mco-manage-policies__form--width This className is only used in this wizard.
There was a problem hiding this comment.
Screen.Recording.2026-05-27.at.12.59.52.PM.mov
There was a problem hiding this comment.
The flow looks good.
8a8f53f to
a47bc76
Compare
| "Enable network file system (NFS)": "Enable network file system (NFS)", | ||
| "Enable replication": "Enable replication", | ||
| "Enable S3-compatible object storage that spans across multiple cloud providers or hybrid environments": "Enable S3-compatible object storage that spans across multiple cloud providers or hybrid environments", | ||
| "Enable the `retainNamespaceSCCAcrossPeers` flag in the RamenConfig to automatically create namespaces with matching security context constraints (SCC) across peer clusters. Learn more": "Enable the `retainNamespaceSCCAcrossPeers` flag in the RamenConfig to automatically create namespaces with matching security context constraints (SCC) across peer clusters. Learn more", |
There was a problem hiding this comment.
why do we have "Learn more" when we are not redirecting to any doc ??
There was a problem hiding this comment.
removed for now
|
/hold cancel |
|
/cherry-pick release-4.22 |
|
@SanjalKatiyar: once the present PR merges, I will cherry-pick it on top of DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
/cherry-pick release-4.21 |
|
@SanjalKatiyar: once the present PR merges, I will cherry-pick it on top of DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
/cherry-pick release-4.21-compatibility |
|
@SanjalKatiyar: once the present PR merges, I will cherry-pick it on top of DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
a47bc76 to
2e62700
Compare
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: asn1809, bipuladh, Harshvardhan-handa123, raghavendra-talur The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/retest |
|
/override ci/prow/odf-console-e2e-aws |
|
@SanjalKatiyar: Overrode contexts on behalf of SanjalKatiyar: ci/prow/odf-console-e2e-aws DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
de61aab
into
red-hat-storage:master
|
@SanjalKatiyar: new pull request created: #2853 DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
@SanjalKatiyar: #2794 failed to apply on top of branch "release-4.21": DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
@SanjalKatiyar: #2794 failed to apply on top of branch "release-4.21-compatibility": DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |

JIRA Bug: https://redhat.atlassian.net/browse/DFBUGS-6239
SS:
Enroll discovered Application flow:

if retainNamespaceSCCAcrossPeers flag is false:
if true:

Enroll Managed Application flow:
